package com.cwd.arm.application.service.read.facade;

import com.cwd.arm.application.dto.ReceiveNodeDto;
import com.cwd.arm.infrastructure.query.ReceiveNodeDaoQuery;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Description:收款节点
 * Created on 2021年11月16日
 *
 * @author yan
 */
@Service
public interface ReceiveNodeReadService {

    ReceiveNodeDto selectById(Long id);

    List<ReceiveNodeDto> selectByProjectId(Long projectId);

    List<ReceiveNodeDto> selectByQuery(ReceiveNodeDaoQuery daoQuery);

    /**
     * 收款进度
     *
     * @param amount
     * @return
     */
    BigDecimal getRate(Long projectId, Long nodeId, BigDecimal amount, String date) throws Exception;

    /**
     * 收款金额
     *
     * @param rate
     * @return
     */
    BigDecimal getAmount(Long projectId, Long nodeId, BigDecimal rate,String date) throws Exception;

}
